home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Invisible Universe
/
Invisible Universe (1995)(Voyager)[Mac-PC].iso
/
mac
/
UNIVERSE
/
SHARED.DIR
/
01013_Script_go stuff shared
< prev
next >
Wrap
Text File
|
1995-11-21
|
12KB
|
475 lines
on stopSoundIU
-- global gFadeOutP
--
-- sound fadeOut 1, 1
-- sound stop 1
-- sound fadeIn 1, 1
--
-- set gFadeOutP = 0
end stopSoundIU
on soundFadeIU
-- global gFadeOutP, gFadeEnd
--
-- sound fadeOut 1, 120
-- set gFadeOutP = true
-- set gFadeEnd = the ticks + 1200
end soundFadeIU
on soundFadeIdleIU
-- global gFadeOutP, gFadeEnd, gSoundIdle
--
-- if voidP(gSoundIdle) then
-- set gSoundIdle = 0
-- else
-- if gSoundIdle = 120 then
-- if gFadeEnd < the ticks then
-- sound stop 1
-- set gFadeOutP = false
-- sound fadeIn 1, 1
-- set gSoundIdle = 0
-- end if
-- else
-- set gSoundIdle = gSoundIdle + 1
-- end if
-- end if
end soundFadeIdleIU
on goGo theLabel, noRetrace
global gCurHist, gCurData, gNavPalette, gCom, gCurLabelProp
global gCurLabelList, gLabels, gNextMovie, gRetraceInProgress
global gTOCRetraceChan, gRetraceCount, gGlossPalette, gPoemLabel, gVolume
cursor 4
--put ">>>goGo (1013)" && theLabel
if char 1 of string(theLabel) = "P" then
if theLabel = "PM" then set theLabel = "P1"
set gPoemLabel = string(theLabel)
end if
set origFrameLabel = the frameLabel
if the movie = "TOC.DIR" then
--stopSoundIU
end if
if the movie = "TOUR.DIR" or the movie = "MOVIES.DIR" then puppetSprite 15, 0
if the movie <> "FIND.DIR" and the movie <> "SHOWGLOS.DIR" then
if not noRetrace then
if the frameLabel = "" then
if gCurLabelProp = "" or voidP(gCurLabelProp) then
if the movie = "TOUR.DIR" or the movie = "MOVIES.DIR" then
set x = marker(0)
go to x
--put ">>>goGO retrace label =" & the frameLabel
addToRetrace(the frameLabel)
--asdf
else
alert "Internal error 1013a (retrace error)"
exit
end if
else
addToRetrace(gCurLabelProp)
end if
else
addToRetrace(the frameLabel)
end if
end if
end if
if gCom then
-- change these to -1??? dmd tbd
if gCurHist=0 then unGrayHist
if gCurData=0 then unGrayData
go to string(gCurLabelProp)
updateStage
end if
--put ">>> going to black frame from GoGo in 1013"
--beep
--puppetTransition 50, 20, 8, 0
--puppetTransition 50, 20, 8, 1
if the movie = "TOUR.DIR" or the movie = "MOVIES.DIR" then puppetSprite 15, 0
go to label ("Black Frame")
set the visibility of sprite gTOCRetraceChan = (gRetraceCount > 0)
--beep
if the movie = "TOC.DIR" then showCOMenus
--
--
-- Get the new label from the list of all labels to get a this
-- object's label list.
--
set gCurLabelList = getAProp(gLabels, theLabel)
--put ">>> list for the prop: " & gCurLabelList
if voidP(gCurLabelList) then
alert "Can't find label: " & quote & theLabel & quote & ". cast 1013"
set gCurLabelList = getAProp(gLabels, gCurLabelProp)
else
set gCurLabelProp = theLabel
end if
set gNextMovie = getAt(gCurLabelList, 2)
set c1 = char 1 of gNextMovie
if c1 = "O" then
--put ">>> Going to a Celestial Object" && theLabel
set c1 = char 1 of string(theLabel)
if not voidP(gGlossPalette) then tell gGlossPalette to lCloseGlossPalette
if not gRetraceInProgress then
if ((the movie = "TOC.DIR") and ((char 1 of origFrameLabel) = "O")) or the movie = "STARMAP.DIR" then
sound playFile 1, "TRANS311.AIF"
set the volume of sound 1 = gVolume
-- if the machineType <> 256 then
-- sound playFile 1, "::MEDIA:SOUNDS:TRANS3.AIF"
-- else
-- sound playFile 1, "..\MEDIA\SOUNDS\TRANS3.AIF"
-- end if
end if
end if
updateStage
goObject(theLabel)
else
if gCom then
hideButtons
tell gNavPalette to lCloseNavPalette(1)
updateStage
end if
if c1 = "P" or c1 = "S" or c1 = "T" or c1 = "M" then
--put ">>> Going to a Poem or StarMap or TOC or Movies or Music" && theLabel
goGeneric(theLabel)
else
beep
--put ">>> Don't know where I am going" && theLabel
alert "internal error: no where to go... cast 1013"
asdf
end if
end if
cursor -1
end goGo
on goGeneric theLabel
global gCurLabelProp, gNextMovie
-- gLabels a list of all the labels
-- gCurLabelList the list for the current object
-- gCurLabelProp the current property
--put ">>> goGeneric("&theLabel&")"
--put ">>> going to movie: " & gNextMovie & " label : "& string(theLabel)
-- dmd make this work ??? TBD (should be faster)
puppetTransition 50, 10, 8, 0
puppetTransition 50, 10, 8, 0
if the movie = gNextMovie then
go to frame string(gCurLabelProp)
else
go to frame string(gCurLabelProp) of movie gNextMovie
end if
if the freeBytes < 500000 then
--put ">>> calling maxmem"
if the machineType <> 256 then maxmem()
end if
if the movie = "TOUR.DIR" and the frameLabel <> "" then
global gTourLabel
set gTourLabel = the frameLabel
end if
if the movie = "MOVIES.DIR" and the frameLabel <> "" then
global gMovieLabel
set gMovieLabel = the frameLabel
end if
if the movie = "TOC.DIR" and char 1 of theLabel = "P" then
global gLastPoem
put theLabel into gLastPoem
--put char 2 of theLabel into word 1 of field "page"
end if
end goGeneric
on goObject theLabel
global gLabels, gCurLabelList, gCurLabelProp, gCom, gNavPalette
global gUpdateViewsMenuP, gNavViews, gSuppPhoto, gUpdateNavPalette
global gNextMovie
-- gLabels a list of all the labels
-- gCurLabelList the list for the current object
-- gCurLabelProp the current property
--put ">>> goObject("&theLabel&")"
--
--
-- This is the best place to set the flag... remove all others DMD TBD ???
--
set gSuppPhoto = (char 6 of string(theLabel)) = "S"
set gUpdateViewsMenuP = 1
-- if not gSuppPhoto then
-- --
-- --
-- -- If this label is a member gNavViews, then don't change
-- -- the views menu.
-- --
-- set gUpdateViewsMenuP = 1
-- -- if listP(gNavViews) then
-- -- set gUpdateViewsMenuP = (getPos(gNavViews, theLabel) <> 0)
-- -- end if
-- else
-- set gUpdateViewsMenuP = 0
-- end if
--put "??? Update the Views menu? = " & gUpdateViewsMenuP
--put ">>> going to movie: " & gNextMovie & " label : "& string(theLabel)
-- dmd make this work ??? TBD (should be faster)
-- set updateNavPalette = (mov = the movie) and (gCom) and (not gSuppPhoto)
set gUpdateNavPalette = (gCom) -- and (not gSuppPhoto)
--put ">>> updateNavPalette? " & gUpdateNavPalette
-- if updateNavPalette then
-- updatePalPopUps
-- end if
if the movie = gNextMovie then
go to frame string(gCurLabelProp)
setUpCelestialObjectStuff
else
go to frame string(gCurLabelProp) of movie gNextMovie
-- Note: setUpCelestialObjectStuff is called from startMovie
end if
-- if gSuppPhoto then
-- infoOpen
-- updateStage
-- setupHistandDataEtc
-- else
infoClose
showName
updateStage
setupHistandDataEtc
-- end if
end goObject
on addToRetrace theLabel, theDesc
global gRetraceLabelList, gRetraceLabelLongForm, gRetraceCount
global gTSEnabled, gCom, gPoemLabel, gCurLabelProp
--put ">>>shared addToRetrace: " & theLabel && theDesc
--
--
--
-- Check to see if a CO Text Hotspot is on the screen
--
if gCom then
if gTSEnabled or the frameLabel = "D" or the frameLabel = "H" then
--if gCom then
set theLabel = objectLabel()
set gTSEnabled = 0
set the mouseDownScript to empty
end if
end if
--put ">>>addToRetrace: " & theLabel & theDesc
if voidP(gRetraceLabelList) then
set gRetraceLabelList = []
set gRetraceLabelLongForm = ""
end if
if voidP(theLabel) or (theLabel = "")then
if the movie = "SHOWGLOS.DIR" or the movie = "FIND.DIR" then
--put ">>> exiting for SHOWGLOS or FIND"
exit
end if
set newEntry = the frameLabel
if newEntry = "" then
if the movie = "TOUR.DIR" or the movie = "MOVIES.DIR" then
go to the frame - 1
set newEntry = the frameLabel
else if the movie = "POETRY.DIR" then
set newEntry = gPoemLabel
else if gCurLabelProp <> "" then
set newEntry = gCurLabelProp
else
alert "Internal error 1013b (retrace error)"
asdf
end if
end if
else
set newEntry = string(theLabel)
end if
--
--
-- Treat the CO menu as one screen, do not add sub entries to
-- the retrace list.
--
if the movie = "TOC.DIR" and (char 1 of newEntry = "O") then
if newEntry <> "OM" then exit
end if
if voidP(theDesc) then
set tempList = getaProp(gLabels, newEntry)
if not voidP(tempList) then
set theDesc = getAt(tempList, 1)
else
put ">>>Unknown location... error 43 cast 1013" & newENtry
Alert ">>>Unknown location... error 43 cast 1013" & newEntry
asdf
end if
end if
--put ">>> Description of " & newEntry & " is " & theDesc
--
--
-- If the last item on the list is the same, do not RE-ADD it.
--
if gRetraceCount > 0 then
--put ">>>" & quote & getAt(gRetraceLabelList, gRetraceCount) & quote && quote & newEntry & quote
--put ">>>" & quote & line gRetraceCount of gRetraceLabelLongForm & quote && quote & theDesc & quote
if (getAt(gRetraceLabelList, gRetraceCount) = newEntry) and¼
((line gRetraceCount of gRetraceLabelLongForm) = theDesc) then
exit
end if
end if
set theDesc = theDesc & RETURN
if gRetraceCount = 15 then
deleteAt(gRetraceLabelList, 1)
delete line 1 of gRetraceLabelLongForm
else
set gRetraceCount = gRetraceCount + 1
end if
put theDesc after line gRetraceCount of gRetraceLabelLongForm
addAT gRetraceLabelList, gRetraceCount, newEntry
--put ">>> retrace desc: " & gRetraceLabelLongForm
--put ">>> gRetraceLabelList = " & gRetraceLabelList
return 0
end addToRetrace
on muGoxxx whar
global gMusicLabel
put whar into gMusicLabel
--go frame gMusicLabel of movie "Music"
addToRetrace
go movie "Music"
end muGo
on toGoxxx whar
global gTourLabel
put whar into gTourLabel
addToRetrace
go movie "Tour"
end toGo
on moGoxxx whar
global gMovieLabel
put whar into gMovieLabel
addToRetrace
go movie "Movies"
end toGo
on poGoxxx PrevOrNext
global gLastPoem
put word 1 of field "page" into thisPage
if PrevOrNext = "Next" then
if thisPage = "9" then
put "1" into pageNum
else put string(integer(thisPage)+1) into pageNum
else
if thisPage = "1" then
put "9" into pageNum
else put string(integer(thisPage)-1) into pageNum
end if
put "P"&pageNum into gLastPoem
go label(gLastPoem)
put pageNum into word 1 of field "page"
end poGo
on dump what
-- do "put ""e&string(value(what))"e&"&&""e&"=""e&what"e
end
on mygoXXX whar
global gPreloadList, gPreloadIndex
-- use for this movie only
--
--
-- dmd explore this preload index stuff ???
--
--put ">>> mygo cast 1013"
put getOne(gPreloadIndex, whar) into myIndex
justGo(getAt(gPreloadList, myIndex))
end mygo